home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / AIncludes / SysEqu.a < prev    next >
Encoding:
Text File  |  1992-01-29  |  53.8 KB  |  1,390 lines  |  [TEXT/MPS ]

  1. ; Version: 3.25
  2. ; Created: Friday, October 20, 1989 at 9:54:34 PM
  3. ;
  4. ; File: SysEqu.a
  5. ;
  6. ; Assembler Interface to the Macintosh Libraries
  7. ; Copyright Apple Computer, Inc. 1986-1991
  8. ; All Rights Reserved
  9. ;
  10. ;___________________________________________________________________________
  11. ;
  12. ; System Equates -- This file defines the low-level equates for the
  13. ; Macintosh software. This is divided into two pieces for
  14. ; assembly space and speed considerations. The wholeSystem flag is used
  15. ; to include the less common equates which realizes a complete set. The
  16. ; comments marked with ";+" denote categories or managers. Record
  17. ; stuctures may have additional private equates which are defined by and
  18. ; reserved for use by Apple Computer, Inc.
  19. ;
  20. ;___________________________________________________________________________
  21.  
  22.     IF &TYPE('__IncludingSysEqu__') = 'UNDEFINED' THEN
  23. __IncludingSysEqu__    SET    1
  24.  
  25.                   IF          (&TYPE('wholeSystem') = 'UNDEFINED') THEN
  26. wholeSystem       EQU         1
  27.                   ENDIF
  28.  
  29. ; ioFlags:
  30. noCacheBit        EQU             5                     ; disable cacheing for this operation  <S333/15Dec87>
  31. noCache            EQU          $20                 ; constant for noCacheBit   <S333/15Dec87>
  32.  
  33. PCDeskPat         EQU         $20B                      ; desktop pat, top bit only! others are in use
  34. HiKeyLast         EQU         $216                      ; Same as KbdVars
  35. KbdLast           EQU         $218                      ; Same as KbdVars+2
  36. ExpandMem         EQU         $2B6                      ; pointer to expanded memory block
  37.  
  38. ; Test Manager EQUs
  39. videoMagic        EQU         $5A932BC7                 ; When VideoInfoOk contains this value, the video card is ok (CritErr).
  40.  
  41. ; Unit table size constants (Used in startInit.a)
  42. unitEntries       EQU         64                        ; default # of entries in unit table
  43. maxUTEntries      EQU         unitEntries+64            ; Set Max higher so the table can grow.
  44. bgnSlotUnit       EQU         48                        ; default start unit number for slots.
  45. bgnSlotRef        EQU         -(bgnSlotUnit+1)          ; default start RefNum for slots.
  46.  
  47. ; Start Boot state constants.
  48. sbState0          EQU         0                         ; StartBoot code is at state-0.
  49. sbState1          EQU         1                         ; StartBoot code is at state-1.
  50.  
  51. ; system alarm
  52.  
  53. alrmFlEnable      EQU         0                         ; 1 => alarm clock mechanism is triggered
  54. ; Apple Desktop Bus
  55. JADBProc          EQU         1720                      ; (long) procedure called on ADBReInit
  56.  
  57. ; start at $C00
  58.  
  59. SCSIBase          EQU         $0C00                     ; (long) base address for SCSI chip read
  60. SCSIDMA           EQU         $0C04                     ; (long) base address for SCSI DMA
  61. SCSIHsk           EQU         $0C08                     ; (long) base address for SCSI handshake
  62. SCSIGlobals       EQU         $0C0C                     ; (long) ptr for SCSI mgr locals
  63. RGBBlack          EQU         $0C10                     ; (6 bytes) the black field for color
  64. RGBWhite          EQU         $0C16                     ; (6 bytes) the white field for color
  65.  
  66. RowBits           EQU         $0C20                     ; (word) screen horizontal pixels
  67. ColLines          EQU         $0C22                     ; (word) screen vertical pixels
  68. ScreenBytes       EQU         $0C24                     ; (long) total screen bytes
  69.  
  70.  
  71. NMIFlag           EQU         $0C2C                     ; (byte) flag for NMI debounce
  72. VidType           EQU         $0C2D                     ; (byte) video board type ID
  73. ScrnInval        EQU            $0C2D                    ; (byte) replaces obscure VidType.  When $FFFF, scrn resource is
  74.                                                     ;        valid.  When cleared, scrn resource is invalid.
  75. VidMode           EQU         $0C2E                     ; (byte) video mode (4=4bit color)
  76. SCSIPoll          EQU         $0C2F                     ; (byte) poll for device zero only once.
  77.  
  78.  
  79. SEVarBase         EQU         $0C30                     ; ($0C30-0CB0) 128 bytes for sys err data
  80. ; note!!! - if changed, need to change also in hwequ file
  81.  
  82. MMUFlags          EQU         $0CB0                     ; (byte) cleared to zero (reserved for future use)
  83. MMUType           EQU         $0CB1                     ; (byte) kind of MMU present
  84. MMU32bit          EQU         $0CB2                     ; (byte) boolean reflecting current machine MMU mode
  85. MMUTbl            EQU         $0CB4                     ; (long) pointer to MMU Mapping table
  86. MMUTblSize        EQU         $0CB8                     ; (long) size of the 24 bit mode MMU mapping table
  87. MMU24Info         EQU         $0CB4                      ; (long) ptr to 24 bit mode MMU configuration info
  88. MMU32Info         EQU         $0CB8                     ; (long) ptr to 32 bit mode MMU configuration info
  89. SInfoPtr          EQU         $0CBC                     ; (long) pointer to Slot manager information
  90. ASCBase           EQU         $0CC0                     ; (long) pointer to Sound Chip
  91. SMGlobals         EQU         $0CC4                     ; (long) pointer to Sound Manager Globals
  92. TheGDevice        EQU         $0CC8                     ; (long) the current graphics device
  93. CQDGlobals        EQU         $0CCC                     ; (long) quickDraw global extensions
  94.  
  95. ; TEMPORARY EQUATE
  96. DeskCPat          EQU         $0CD8                     ; [PixPatHandle] Handle to desk pixPat
  97.  
  98. TimeVIADB         EQU         $0CEA                     ; (word) number of iter's of VIA access & DBRA.    <1.3>
  99.  
  100. VIA2               EQU         $0CEC                     ; VIA2 base address [pointer]                    <2.7>
  101. RBV                EQU            VIA2                    ; RBV base address [pointer] share with VIA2    <2.7>
  102. VIA2RBV           EQU         VIA2                     ; VIA2 or RBV base address [pointer]            <1.3><2.7>
  103. OSS                EQU            VIA2                    ; OSS base address [pointer] share with VIA2    <2.7>
  104. VIA2RBVOSS       EQU         VIA2                     ; VIA2 or RBV or OSS base address [pointer]        <2.7>
  105. VISA            EQU            VIA2                    ; VISA base address [pointer]                    <11>
  106. V8                EQU            VIA2                    ; V8 base address [pointer]
  107.  
  108. WarmStart         EQU         $0CFC                     ; (long) flag to indicate it is a warm start
  109. wmStConst         EQU         $574C5343                 ; warm start constant
  110. sleepConst        EQU         'SARA'                    ; waking from sleep constant
  111. TimeDBRA          EQU         $0D00                     ; (word) number of iterations of DBRA per millisecond
  112. TimeSCCDB         EQU         $0D02                     ; (word) number of iter's of SCC access & DBRA.
  113.  
  114. PmgrBase          EQU         $0D18                      ; Lomem pointer to power manager vars
  115.  
  116. TableSeed         EQU         $0D20                     ; (long) seed value for color table ID's
  117. SRsrcTblPtr       EQU         $0D24                     ; (long) pointer to slot resource table.
  118. JVBLTask          EQU         $0D28                     ; vector to slot VBL task interrupt handler
  119. WMgrCPort         EQU         $0D2C                     ; window manager color port
  120. VertRRate         EQU         $0D30                     ; (word) Vertical refresh rate for start manager.
  121.  
  122. ChunkyDepth       EQU         $0D60                     ; depth of the pixels
  123. CrsrPtr           EQU         $0D62                     ; pointer to cursor save area
  124. PortList          EQU         $0D66                     ; list of grafports
  125. MickeyBytes       EQU         $0D6A                     ; long pointer to cursor stuff
  126. QDErr             EQU         $0D6E                     ; QuickDraw error code [word]
  127. VIA2DT            EQU         $0D70                     ; 32 bytes for VIA2 dispatch table for NuMac
  128.  
  129. SInitFlags        EQU         $0D90                     ; StartInit.a flags [word]
  130. DTQueue           EQU         $0D92                     ; (10 bytes) deferred task queue header
  131. DTQFlags          EQU         $0D92                     ; flag word for DTQueue
  132. DTskQHdr          EQU         $0D94                     ; ptr to head of queue
  133. DTskQTail         EQU         $0D98                     ; ptr to tail of queue
  134. JDTInstall        EQU         $0D9C                     ; (long) ptr to deferred task install routine
  135. HiliteRGB         EQU         $0DA0                     ; 6 bytes: rgb of hilite color
  136. DSCtrAdj          EQU         $0DA8                     ; (long) Center adjust for DS rect.
  137. IconTLAddr        EQU         $0DAC                     ; (long) pointer to where start icons are to be put.
  138. VideoInfoOK       EQU         $0DB0                     ; (long) Signals to CritErr that the Video card is ok
  139. EndSRTPtr         EQU         $0DB4                     ; (long) Pointer to the end of the Slot Resource Table (Not the SRT buffer).
  140. SDMJmpTblPtr      EQU         $0DB8                     ; (long) Pointer to the SDM jump table
  141. JSwapMMU          EQU         $0DBC                     ; (long) jump vector to SwapMMU routine
  142. SdmBusErr         EQU         $0DC0                     ; (long) Pointer to the SDM busErr handler
  143. LastTxGDevice     EQU         $0DC4                     ; (long) copy of TheGDevice set up for fast text measure
  144.  
  145. NewCrsrJTbl       EQU         $88C                      ; location of new crsr jump vectors
  146. NewCrsrJCnt       EQU         1                         ; 2 new vectors
  147. JAllocCrsr        EQU         $88C                      ; (long) vector to routine that allocates cursor
  148. JSetCCrsr         EQU         $890                      ; (long) vector to routine that sets color cursor
  149. JOpcodeProc       EQU         $894                      ; (long) vector to process new picture opcodes
  150. CRSRBASE          EQU         $898                      ; (long) scrnBase for cursor
  151. CrsrDevice        EQU         $89C                      ; (long) current cursor device
  152. SrcDevice         EQU         $8A0                      ; (LONG) Src device for Stretchbits
  153. MainDevice        EQU         $8A4                      ; (long) the main screen device
  154. DeviceList        EQU         $8A8                      ; (long) list of display devices
  155. CRSRROW           EQU         $8AC                      ; (word) rowbytes for current cursor screen
  156. QDColors          EQU         $8B0                      ; (long) handle to default colors
  157.  
  158. ; QuickDraw
  159.  
  160. HiliteMode        EQU         $938                      ; used for color highlighting
  161.  
  162.  
  163. ; Exception vectors
  164.  
  165. BusErrVct         EQU         $08                       ; bus error vector
  166. AddrVector        EQU            $C                ; address error
  167. IlglVector        EQU            $10                ; illegal instruction
  168. ZeroVector        EQU            $14                ; divide by 0
  169. CheckVector        EQU            $18                ; check bounds error
  170. TrapVVector        EQU            $1C                ; trapv location
  171. PrivlgVector    EQU            $20                ; privilege violation
  172. TraceVector        EQU            $24                ; trace exception vector
  173. Line1010          EQU         $28               ; 1010 emulator trap (system routines)
  174. Line1111          EQU         $2C               ; 1111 emulator trap (reserved)
  175. DebugVector        EQU            Line1111        ; debug instructions
  176. FmtErrVect        EQU         $38               ; format error vector for 68010/68020
  177. BadIntVector    EQU            $60                ; spurious interrupt
  178. AutoInt1          EQU         $64               ; level 1 auto-vector
  179. AutoInt2          EQU         $68               ; level 2 auto-vector
  180. AutoInt3          EQU         $6C               ; level 3 auto-vector
  181. AutoInt4          EQU         $70               ; level 4 auto-vector
  182. AutoInt5          EQU         $74               ; level 5 auto-vector
  183. AutoInt6          EQU         $78               ; level 6 auto-vector
  184. AutoInt7          EQU         $7C               ; level 7 auto-vector
  185. BkptVector        EQU            $B8                ; break loc
  186.  
  187. ;-------------
  188. ; MMU Equates
  189. ;-------------
  190.  
  191. ; MMU Mode bits
  192. ;
  193. ; type MMU_Mode = (true32b,false32b)
  194.  
  195. false32b          EQU         0                         ; modified
  196. true32b           EQU         1
  197.  
  198. ;+ System Error Handler
  199.  
  200. RestProc          EQU         $A8C                      ; Resume procedure f InitDialogs [pointer]
  201.  
  202. ; equates for queue elements
  203.  
  204. sIQType           EQU         6                         ; slot interrupt queue element ID
  205.  
  206. ;Default Startup
  207.  
  208. ;DefaultRec offsets for set/get default startup
  209.  
  210. drDriveNum        EQU         0                         ; [INTEGER]
  211. drRefNum          EQU         2                         ; [INTEGER]
  212.  
  213. ; Deferred Task Queue Element
  214.  
  215. dtQType           EQU         7                         ; deferred task queue element ID
  216. inDTQ             EQU         6                         ; bit index for "in deferred task" flag
  217. dtLink            EQU         0                         ; Link to next element [pointer]
  218. dtType            EQU         4                         ; Unique ID for validity [word]
  219. dtFlags           EQU         6                         ; optional flags [word]
  220. dtAddr            EQU         8                         ; service routine [pointer]
  221. dtParm            EQU         $C                        ; optional A1 parameter [long]
  222. dtResrvd          EQU         $10                       ; reserved [long]
  223. dtQElSize         EQU         20                        ; length of DT queue element in bytes
  224.  
  225.  
  226. ; Topanga video mode for Esprit
  227. NTSC               EQU         $B3E                      ; A byte                        <v2.1>
  228.  
  229.  
  230. ;+ ROM Equates
  231.  
  232. ROM85             EQU         $28E                      ; (word) actually high bit - 0 for ROM vers $75 (sic) and later
  233. ROMMapHndl        EQU         $B06                      ; (long) handle of ROM resource map
  234.  
  235. ;+ Screen Equates
  236.  
  237. ScrVRes           EQU         $102                      ; screen vertical dots/inch [word]
  238. ScrHRes           EQU         $104                      ; screen horizontal dots/inch [word]
  239. ScrnBase          EQU         $824                      ; Screen Base [pointer]
  240. ScreenRow         EQU         $106                      ; rowBytes of screen [word]
  241.  
  242.  
  243. ; Mouse/Keyboard
  244.  
  245. MBTicks           EQU         $16E                      ; tick count @ last mouse button [long]
  246. JKybdTask         EQU         $21A                      ; keyboard VBL task hook [pointer]
  247. KeyLast           EQU         $184                      ; ASCII for last valid keycode [word]
  248. KeyTime           EQU         $186                      ; tickcount when KEYLAST was rec'd [long]
  249. KeyRepTime        EQU         $18A                      ; tickcount when key was last repeated [long]
  250.  
  251. ;+ Parameter RAM (a twenty byte copy of the real parameter ram).
  252.  
  253. SPConfig          EQU         $1FB                      ; config bits: 4-7 A, 0-3 B (see use type below)
  254. SPPortA           EQU         $1FC                      ; SCC port A configuration [word]
  255. SPPortB           EQU         $1FE                      ; SCC port B configuration [word]
  256.  
  257. ; SCC Serial Chip Addresses
  258.  
  259. SCCRd             EQU         $1D8                      ; SCC base read address [pointer]
  260. SCCWr             EQU         $1DC                      ; SCC base write address [pointer]
  261.  
  262. ; Serial port use type
  263.  
  264. useFree           EQU         0                         ; Use undefined
  265. useATalk          EQU         1                         ; AppleTalk
  266. useAsync          EQU         2                         ; Async
  267. useExtClk         EQU         3                         ; externally clocked
  268.  
  269. ; Unpacked, user versions of parameter ram
  270.  
  271. DoubleTime        EQU         $2F0                      ; double click ticks [long]
  272. CaretTime         EQU         $2F4                      ; caret blink ticks [long]
  273. KeyThresh         EQU         $18E                      ; threshold for key repeat [word]
  274. KeyRepThresh      EQU         $190                      ; key repeat speed [word]
  275. SdVolume          EQU         $260                      ; Global volume(sound) control [byte]
  276.  
  277.  
  278. ;+ System Clocks
  279.  
  280. Ticks             EQU         $16A                      ; Tick count, time since boot [long]
  281. Time              EQU         $20C                      ; clock time (extrapolated) [long]
  282.  
  283.  
  284. ;+ Cursor
  285.  
  286. iBeamCursor       EQU         1                         ; text selection cursor
  287. crossCursor       EQU         2                         ; for structured selection
  288. plusCursor        EQU         3                         ; for drawing graphics
  289. watchCursor       EQU         4                         ; for indicating a long delay
  290.  
  291.  
  292. ; result codes for Relstring call
  293.  
  294. sortsBefore       EQU         -1                        ; str1 < str2
  295. sortsEqual        EQU         0                         ; str1 = str2
  296. sortsAfter        EQU         1                         ; str1 > str2
  297.  
  298. ;+ Queue Package
  299.  
  300. qInUse            EQU         7                         ; queue-in-use flag bit
  301.  
  302. ; Header Record
  303.  
  304. qHeadSize         EQU         $A                        ; queue header size
  305. qFlags            EQU         0                         ; miscellaneous flags [word]
  306. qHead             EQU         2                         ; first element in queue [pointer]
  307. qTail             EQU         6                         ; last element in queue [pointer]
  308.  
  309. ; General Purpose Queue Element Definition
  310.  
  311. qLink             EQU         0                         ; link to next queue element [pointer]
  312. qType             EQU         4                         ; queue element type [word]
  313.  
  314.  
  315. ;+ Event Manager
  316.  
  317. evType            EQU         4                         ; event queue element is type 4
  318.  
  319. ; Event Type Numbers (in EvtNum)
  320.  
  321. everyEvent        EQU         -1
  322. nullEvt           EQU         0                         ; event 0 is the null event
  323. mButDwnEvt        EQU         1                         ; mouse button down is event 1
  324. mButUpEvt         EQU         2                         ; mouse button up is event 2
  325. keyDwnEvt         EQU         3                         ; key down is event 3
  326. keyUpEvt          EQU         4                         ; key up is event 4
  327. autoKeyEvt        EQU         5                         ; auto-repeated key is event 5
  328. updatEvt          EQU         6                         ; update event
  329. diskInsertEvt     EQU         7                         ; disk-inserted event
  330. activateEvt       EQU         8                         ; activate/deactive event
  331. osEvt            EQU            $F                        ; suspend/resume/mousemoved
  332. kHighLevelEvent    EQU            $17                        ; high-level event
  333.  
  334. ; Event Mask Equates
  335. ; (same constant names are masks rather than bit numbers in higher level languages.
  336. ; Only special one is highLevelEvtBit, since it has only indirect correspondence to
  337. ; kHighLevelEvent. 
  338.  
  339. highLevelEvtBit    EQU            $A                        ; for kHighLevelEvent
  340.  
  341. ; Event Message Equates
  342.  
  343. charCodeMask          EQU         $000000FF
  344. keyCodeMask           EQU         $0000FF00
  345. adbAddrMask           EQU         $00FF0000
  346. osEvtMessageMask       EQU         $FF000000
  347.  
  348. ; osEvt Messages.  Event (sub)code is in the high byte of the message field.
  349. mouseMovedMessage        EQU     $FA ;
  350. suspendResumeMessage    EQU     $01 ;
  351. resumeFlag                EQU     0    ; Bit 0 of message field indicates resume vs suspend }
  352. convertClipboardFlag    EQU     1    ; Bit 1 in resume message indicates clipboard change }
  353.  
  354. ; Modifier bits in event record
  355. ; (same constant names are masks rather than bit numbers in higher level languages.)
  356.  
  357. activeFlag        EQU         $0                        ; activate? (activateEvt and mouseDown)
  358. btnState          EQU         $7                        ; state of button?
  359. cmdKey            EQU         $8                        ; command key down?
  360. shiftKey          EQU         $9                        ; shift key down?
  361. alphaLock         EQU         $A                        ; alpha lock down?
  362. optionKey         EQU         $B                        ; option key down?
  363. controlKey        EQU         $C                        ; control key down?
  364.  
  365. ; Event Record Definition
  366.  
  367. evtNum            EQU         0                         ; event code [word]
  368. evtMessage        EQU         2                         ; event message [long]
  369. evtTicks          EQU         6                         ; ticks since startup [long]
  370. evtMouse          EQU         $A                        ; mouse location [long]
  371. evtMeta           EQU         $E                        ; state of modifier keys [byte]
  372. evtMBut           EQU         $F                        ; state of mouse button [byte]
  373. evtBlkSize        EQU         $10                       ; size in bytes of the event record
  374. MonkeyLives       EQU         $100                      ; monkey lives if >= 0 [word]
  375. SEvtEnb           EQU         $15C                      ; enable SysEvent calls from GNE [byte]
  376. JournalFlag       EQU         $8DE                      ; journaling state [word]
  377. JournalRef        EQU         $8E8                      ; Journalling driver's refnum [word]
  378.  
  379. ; Obsolete Event Manager Equates
  380.  
  381. netWorkEvt        EQU         $A                        ; network event
  382. ioDrvrEvt         EQU         $B                        ; driver-defined event
  383. app1Evt           EQU         $C                        ; application defined events
  384. app2Evt           EQU         $D
  385. app3Evt           EQU         $E
  386. app4Evt           EQU         $F
  387.  
  388. ;+ Memory Manager
  389.  
  390. ; Master pointer bits for handles - USE _HLock, _HPurge, etc. for portability
  391.  
  392. lock              EQU         7                         ; lock bit in a master pointer
  393. purge             EQU         6                         ; bit for purgeable/unpurgeable
  394. resource          EQU         5                         ; bit to flag a resource handle
  395.  
  396.  
  397. BufPtr            EQU         $10C                      ; top of application memory [pointer]
  398. StkLowPt          EQU         $110                      ; Lowest stack as measured in VBL task [pointer]
  399. TheZone           EQU         $118                      ; current heap zone [pointer]
  400. ApplLimit         EQU         $130                      ; application limit [pointer]
  401. SysZone           EQU         $2A6                      ; system heap zone [pointer]
  402. ApplZone          EQU         $2AA                      ; application heap zone [pointer]
  403. HeapEnd           EQU         $114                      ; end of heap [pointer]
  404. HiHeapMark        EQU         $BAE                      ; (long) highest address used by a zone below sp
  405. MemErr            EQU         $220                      ; last memory manager error [word]
  406. maxSize           EQU         $800000                   ; outrageously large memory mgr request
  407. dfltStackSize     EQU         $00002000                 ; 8K size for stack
  408. mnStackSize       EQU         $00000400                 ; 1K minimum size for stack
  409.  
  410. ; _InitZone argument table.
  411.  
  412. startPtr          EQU         0                         ; Start address for zone [pointer]
  413. limitPtr          EQU         4                         ; Limit address for zone [pointer]
  414. cMoreMasters      EQU         8                         ; Number of masters to allocate at time [word]
  415. pGrowZone         EQU         10                        ; growZone procedure [pointer]
  416.  
  417. ; Control/Status Call Codes
  418.  
  419. killCode          EQU         1                         ; KillIO code
  420. drvStsCode        EQU         8                         ; status call code for drive status
  421. ejectCode         EQU         7                         ; control call eject code
  422. tgBuffCode        EQU         8                         ; set tag buffer code
  423.  
  424. ; Driver flags, (Bit definitions for DCtlFlags byte)
  425.  
  426. dReadEnable       EQU         0                         ; enabled for read operations
  427. dWritEnable       EQU         1                         ; enabled for writing
  428. dCtlEnable        EQU         2                         ; enabled for control operations
  429. dStatEnable       EQU         3                         ; enabled for status operations
  430. dNeedGoodBye      EQU         4                         ; needs a "goodbye kiss"
  431. dNeedTime         EQU         5                         ; needs "main thread" time
  432. dNeedLock         EQU         6                         ; needs to be accessed at interrupt level
  433.  
  434. ; Run-Time flags, (Bit definitions for DCtlFlags+1 byte)
  435.  
  436. dOpened           EQU         5                         ; bit to mark driver 'Open'
  437. dRAMBased         EQU         6                         ; 1=RAM-based Driver, 0=ROM-based
  438. drvrActive        EQU         7                         ; bit to mark the driver active
  439.  
  440. ; Drive queue element offsets
  441.  
  442. dQDrive           EQU         $6                        ; drive number [word]
  443. dQRefNum          EQU         $8                        ; driver refnum [word]
  444. dQFSID            EQU         $A                        ; file system handling this drive [word]
  445. dQDrvSz           EQU         $C                        ; number of blocks this drive [word]
  446. dQDrvSz2          EQU         $E                        ; if qType = 1, high word of drive size
  447.  
  448. ; Queue Element Type Definitions
  449.  
  450. ioQType           EQU         2                         ; I/O queue element is type 2
  451. drvQType          EQU         3                         ; timer queue element is type 3
  452. fsQType           EQU         5                         ; File System VCB element
  453. slpQType        EQU            $10                        ; Sleep queue element is type 16        <v1.2>
  454. btQType            EQU            21                        ; B*Tree Manager
  455.  
  456. ; Device Control Entry Definition
  457. ;dCtlEntrySize used to be only 40 bytes!
  458.  
  459. dCtlEntrySize     EQU         $34                       ; length of a DCE [52 bytes]
  460. dCtlDriver        EQU         0                         ; driver [handle]
  461. dCtlFlags         EQU         4                         ; flags [word]
  462. dCtlQueue         EQU         6                         ; queue header
  463. dCtlQHead         EQU         8                         ; queue first-element [pointer]
  464. dCtlQTail         EQU         $C                        ; queue last-element [pointer]
  465. dCtlPosition      EQU         $10                       ; position [long]
  466. dCtlStorage       EQU         $14                       ; driver's private storage [handle]
  467. dCtlRefNum        EQU         $18                       ; refNum of this driver [word]
  468. dCtlCurTicks      EQU         $1A                       ; counter for timing systemTask calls [long]
  469. dCtlWindow        EQU         $1E                       ; driver's window (if any) [pointer]
  470. dCtlDelay         EQU         $22                       ; number of ticks between sysTask calls [word]
  471. dCtlEMask         EQU         $24                       ; desk accessory event mask [word]
  472. dCtlMenu          EQU         $26                       ; menu ID associated with driver [word]
  473. dCtlSlot          EQU         $28                       ; device slot Number [byte]
  474. dCtlSlotId        EQU         $29                       ; device Id within slot [byte]
  475. dCtlDevBase       EQU         $2A                       ; driver scratch ptr/offset from base to device [long]
  476. dCtlOwner         EQU         $2E                       ; ptr to task control block(ownership) [Ptr]
  477. dCtlExtDev        EQU         $32                       ; Id of external device [byte]
  478.  
  479.  
  480. ; Driver Globals
  481.  
  482. UTableBase        EQU         $11C                      ; unit I/O table [pointer]
  483. UnitNtryCnt       EQU         $1D2                      ; count of entries in unit table [word]
  484. JFetch            EQU         $8F4                      ; fetch a byte routine for drivers [pointer]
  485. JStash            EQU         $8F8                      ; stash a byte routine for drivers [pointer]
  486. JIODone           EQU         $8FC                      ; IODone entry location [pointer]
  487.  
  488. ;Chooser
  489.  
  490. chooserID         EQU         1                         ; caller value for the chooser
  491.  
  492. ;+ I/O System
  493.  
  494. ; File positioning modes for ioPosMode field of I/O record
  495.  
  496. fsAtMark          EQU         0                         ; at current position of mark
  497. fsFromStart       EQU         1                         ; offset relative to beginning of file
  498. fsFromLEOF        EQU         2                         ; offset relative to logical end-of-file
  499. fsFromMark        EQU         3                         ; offset relative to current mark
  500. rdVerify          EQU         $40                       ; read verify mode
  501.  
  502. ; Permission values for ioPermssn field of I/O record
  503.  
  504. fsCurPerm         EQU         0                         ; whatever is currently allowed
  505. fsRdPerm          EQU         1                         ; request to read only
  506. fsWrPerm          EQU         2                         ; request to write only
  507. fsRdWrPerm        EQU         3                         ; request to read and write
  508. fsRdWrShPerm      EQU         4                         ; request for shared read and write
  509.  
  510. ; I/O record (general fields with trap-specific ones listed below)
  511.  
  512. ioQElSize         EQU         $32                       ; length of I/O parameter block [50 bytes]
  513. ioLink            EQU         $0                        ; queue link in header [pointer]
  514. ioType            EQU         $4                        ; type for safety check [byte]
  515. ioTrap            EQU         $6                        ; the trap [word]
  516. ioCmdAddr         EQU         $8                        ; address to dispatch to [pointer]
  517. ioCompletion      EQU         $C                        ; completion routine [pointer]
  518. ioResult          EQU         $10                       ; I/O result code [word]
  519. ioFileName        EQU         $12                       ; file name pointer [pointer]
  520. ioVRefNum         EQU         $16                       ; volume refnum [word]
  521. ioDrvNum          EQU         $16                       ; drive number [word]
  522. ioRefNum          EQU         $18                       ; file reference number [word]
  523. ioFileType        EQU         $1A                       ; specified along with FileName [byte]
  524.  
  525. ; specific fields for _Read, _Write
  526.  
  527. ioBuffer          EQU         $20                       ; data buffer [pointer]
  528. ioByteCount       EQU         $24                       ; requested byte count [long]
  529. ioNumDone         EQU         $28                       ; actual byte count completed [long]
  530. ioPosMode         EQU         $2C                       ; initial file positioning mode/eol char [word]
  531. ioPosOffset       EQU         $2E                       ; file position offset [long]
  532.  
  533. ; specific fields for _Allocate
  534.  
  535. ioReqCount        EQU         $24                       ; requested new size [long]
  536. ioActCount        EQU         $28                       ; actual byte count allocated [long]
  537.  
  538. ; specific fields for _Open
  539.  
  540. ioPermssn         EQU         $1B                       ; permissions [byte]
  541. ioOwnBuf          EQU         $1C                       ; "private" 522-byte buffer [pointer]
  542.  
  543. ; specific fields for _Rename
  544.  
  545. ioNewName         EQU         $1C                       ; new name pointer [pointer]
  546.  
  547. ; specific fields for _GetFileInfo, _SetFileInfo
  548.  
  549. ioFQElSize        EQU         $50                       ; File command parameter length [80 bytes]
  550. ioFDirIndex       EQU         $1C                       ; directory index of file [word]
  551. ioFlAttrib        EQU         $1E                       ; in-use bit=7, lock bit=0 [byte]
  552. ioFFlType         EQU         $1F                       ; file type [byte]
  553. ioFlUsrWds        EQU         $20                       ; finder info [16 bytes]
  554. ioFFlNum          EQU         $30                       ; file number [long]
  555. ioFlStBlk         EQU         $34                       ; start file block (0000 if none) [word]
  556. ioFlLgLen         EQU         $36                       ; logical length (EOF) [long]
  557. ioFlPyLen         EQU         $3A                       ; physical length in bytes [long]
  558. ioFlRStBlk        EQU         $3E                       ; resource fork's start file block [word]
  559. ioFlRLgLen        EQU         $40                       ; resource fork's logical length (EOF) [long]
  560. ioFlRPyLen        EQU         $44                       ; resource fork's physical length [long]
  561. ioFlCrDat         EQU         $48                       ; creation date & time [long]
  562. ioFlMdDat         EQU         $4C                       ; last modification date & time [long]
  563.  
  564. ; Specific fields for _GetEOF, _SetEOF
  565.  
  566. ioLEOF            EQU         $1C                       ; logical end-of-file [long]
  567.  
  568. ; Specific fields for _SetFileType
  569.  
  570. ioNewType         EQU         $1C                       ; new type byte [byte]
  571.  
  572. ; Specific fields for _GetVolInfo, _GetVolume, _SetVolume, _MountVol, _UnmountVol,
  573. ; _Eject. Note that these traps have a bigger record size.
  574.  
  575. ioVQElSize        EQU         $40                       ; Volume command parameter length [64 bytes]
  576. ioVDrvNum         EQU         $16                       ; drive or volume number [word]
  577. ioVNPtr           EQU         $12                       ; name buffer (or zero) [pointer]
  578. ioVolIndex        EQU         $1C                       ; volume index number [word]
  579. ioVCrDate         EQU         $1E                       ; creation date & time [long]
  580. ioVLsBkUp         EQU         $22                       ; last backup date & time [long]
  581. ioVAtrb           EQU         $26                       ; Volume attributes [word]
  582. ioVNmFls          EQU         $28                       ; # files in directory [word]
  583. ioVDirSt          EQU         $2A                       ; start block of file dir [word]
  584. ioVBlLn           EQU         $2C                       ; length of dir in blocks [word]
  585. ioVNmAlBlks       EQU         $2E                       ; num blks (of alloc size) this dev [word]
  586. ioVAlBlkSiz       EQU         $30                       ; alloc blk byte size [long]
  587. ioVClpSiz         EQU         $34                       ; bytes to try to allocate at a time [long]
  588. ioAlBlSt          EQU         $38                       ; starting block in block map [word]
  589. ioVNxtFNum        EQU         $3A                       ; next free file number [long]
  590. ioVFrBlk          EQU         $3E                       ; # free alloc blks for this vol [word]
  591.  
  592. ; Catalog structure equates:
  593.  
  594. fsRtParID         EQU         1                         ; DirID of parent's root
  595. fsRtDirID         EQU         2                         ; Root DirID
  596. fsXTCNID          EQU         3                         ; Extent B*-Tree file ID
  597. fsCTCNID          EQU         4                         ; Catalog B*-Tree file ID
  598. fsBBCNID        EQU            5                        ; Bad Block "file" ID
  599. fsUsrCNID         EQU         $10                       ; First assignable user CNode ID
  600.  
  601. ; Additional equates for all calls:
  602.  
  603. ioDirID           EQU         $30                       ; directory ID
  604. ioHQElSize        EQU            $34                        ; size of a standard HFS call queue element
  605.  
  606. ; Additional equates for catalog information return:
  607.  
  608. ioFlBkDat         EQU         $50                       ; File's last backup date
  609. ioFlxFndrInfo     EQU         $54                       ; File's additional finder info bytes
  610. ioFlParID         EQU         $64                       ; File's parent directory ID
  611. ioFlClpSiz        EQU         $68                       ; File's clump size, in bytes
  612.  
  613. ; Additional equates for directory information return:
  614.  
  615. ioDirFlg          EQU         4                         ; Bit in ioFlAttrb set to indicate directory
  616. ioDrUsrWds        EQU         $20                       ; Directory's user info bytes
  617. ioDrDirID         EQU         $30                       ; Directory ID
  618. ioDrNmFls         EQU         $34                       ; Number of files in a directory
  619. ioDrCrDat         EQU         $48                       ; Directory creation date
  620. ioDrMdDat         EQU         $4C                       ; Directory modification date
  621. ioDrBkDat         EQU         $50                       ; Directory backup date
  622. ioDrFndrInfo      EQU         $54                       ; Directory finder info bytes
  623. ioDrParID         EQU         $64                       ; Directory's parent directory ID
  624. ioHFQElSiz        EQU         $6C                       ; Size of a Hierarchical File Queue Element
  625.  
  626. ; Additional equates for _TFGetVolInfo:
  627.  
  628. ioVLsMod          EQU         $22                       ; Last modification date
  629. ioVSigWord        EQU         $40                       ; Volume signature
  630. ioVCBVBMst        EQU         $2A
  631. ioVNxtCNID        EQU         $3A
  632. ioVDrvInfo        EQU         $42                       ; Drive number (0 if volume is offline)
  633. ioVDRefNum        EQU         $44                       ; Driver refNum
  634. ioVFSID           EQU         $46                       ; ID of file system handling this volume
  635. ioVBkup           EQU         $48                       ; Last backup date (0 if never backed up)
  636. ioVSeqNum         EQU         $4C                       ; Sequence number of this volume in volume set
  637. ioVWrCnt          EQU         $4E                       ; Volume write count
  638. ioVFilCnt         EQU         $52                       ; Total number of files on volume
  639. ioVDirCnt         EQU         $56                       ; Total number of directories on the volume
  640. ioVFndrInfo       EQU         $5A                       ; Finder information for volume
  641. ioHVQElSize       EQU         $7A                       ; Length of Hierarchical Volume information PB
  642.  
  643. ; fields for _GetFCBInfo:
  644.  
  645. ioFCBIndx         EQU         $1C                       ; FCB index for _GetFCBInfo
  646. ioFCBFiller1      EQU         $1E                       ; filler
  647. ioFCBFlNm         EQU         $20                       ; File number
  648. ioFCBFlags        EQU         $24                       ; FCB flags
  649. ioFCBStBlk        EQU         $26                       ; File start block
  650. ioFCBEOF          EQU         $28                       ; Logical end-of-file
  651. ioFCBPLen         EQU         $2C                       ; Physical end-of-file
  652. ioFCBCrPs         EQU         $30                       ; Current file position
  653. ioFCBVRefNum      EQU         $34                       ; Volume refNum
  654. ioFCBClpSiz       EQU         $36                       ; File clump size
  655. ioFCBParID        EQU         $3A                       ; Parent directory ID
  656. ioFCBQElSize      EQU         $3E                       ; extended size of FCBPBRec
  657.  
  658. ; fields for _GetWDInfo:
  659.  
  660. ioWDIndex         EQU         $1A                       ; Working Directory index for _GetWDInfo
  661. ioWDProcID        EQU         $1C                       ; WD's ProcID (long)
  662. ioWDVRefNum       EQU         $20                       ; WD's Volume RefNum (word)
  663. ioWDDirID         EQU         $30                       ; WD's DirID (long)
  664.  
  665. ; fields for _FSControl call:
  666.  
  667. ioFSVrsn          EQU         $20                       ; File system version
  668.  
  669. ; field for CatMove
  670.  
  671. ioNewDirID        EQU         $24                       ; destination directory for CatMove
  672.  
  673. ; fields for GetLogInInfo
  674.  
  675. ioObjNamePtr    EQU            $1C                        ; pointer to buffer for name of log-in
  676.  
  677. ; fields for GetDirAccess and SetDirAccess
  678.  
  679. ioACOwnerID        EQU            $24                        ; owner field of parameter block
  680. ioACGroupID        EQU            $28                        ; group field of parameter block
  681. ioACAccess        EQU            $2C                        ; access privileges
  682.  
  683. ; values of user IDs and group IDs
  684.  
  685. noUser            EQU            0                        ; no user
  686. administratorUser    EQU        1                        ; administrator’s user number
  687. noGroup            EQU            0                        ; no group
  688.  
  689. ; values of access privileges
  690.  
  691. fullPrivileges    EQU            $00070007                ; all privileges for everybody and owner
  692. ownerPrivileges EQU            $00000007                ; all privileges for owner only
  693.                 
  694. ; Specific fields for CatSearch
  695.  
  696. ioMatchPtr        EQU        $18                    ; match buffer pointer
  697. ioReqMatchCount EQU        $1C                    ; maximum match count
  698. ioActMatchCount EQU        $20                    ; actual match count
  699. ioSearchBits    EQU        $24                    ; search criteria selector
  700. ioSearchInfo1    EQU        $28                    ; search values and range lower bounds
  701. ioSearchInfo2    EQU        $2C                    ; search values and range upper bounds
  702. ioSearchTime    EQU        $30                    ; length of time to run search
  703. ioCatPosition    EQU        $34                    ; catalog position information
  704. ioOptBuffer        EQU        $44                    ; optional read buffer
  705. ioOptBufSize    EQU        $48                    ; length of optional read buffer
  706.  
  707. ; Specific fields for FileID calls
  708.  
  709. ioNamePtr         EQU        $12                    ; name ptr of file 
  710. ioDestNamePtr    EQU        $1C                 ; name ptr of destination file (FIDExchangeFiles only)
  711. ioDestDirID        EQU        $24                    ; directory id of destination file (FIDExchangeFiles only)
  712. ioSrcDirID      EQU        $30                    ; directory id of file specified. 
  713. ioFileID        EQU        $36                    ; file id of file
  714.  
  715. ; Specific fields for Get/SetForeignPrivs
  716. ioForeignPrivInfo1    EQU        $2C
  717. ioForeignPrivInfo2    EQU        $30
  718. ioForeignPrivInfo3    EQU        $34
  719. ioForeignPrivInfo4    EQU        $38
  720.  
  721. ; specific fields for MakeFSSpec
  722. ioFSSpecPtr            EQU        $1C
  723.  
  724. ; Specific fields for device _Open
  725.  
  726. ioMix             EQU         $1C                       ; General purpose field imported by driver[long]
  727. ioFlags           EQU         $20                       ; General purpose flags [word]
  728. ioSlot            EQU         $22                       ; Slot [byte]
  729. ioId              EQU         $23                       ; Id [byte]
  730. ioSEBlkPtr        EQU         $22                       ; Pointer to the seBlock [long]
  731.  
  732. ; ioFlags:
  733. fMulti            EQU         $00                       ; b0 = fMulti: ioSEBlkPtr is valid (ioSlot, ioId are invalid)
  734.  
  735. ; Specific fields for _Control, _Status
  736.  
  737. csCode            EQU         $1A                       ; control/status code [word]
  738. csParam           EQU         $1C                       ; operation-defined parameters [22 bytes]
  739.  
  740. ; FInfo (Finder Information) record layout
  741.  
  742. fdType            EQU         $0                        ; type of file [long]
  743. fdCreator         EQU         $4                        ; file's creator [long]
  744. fdFlags           EQU         $8                        ; flags [word]
  745. fdLocation        EQU         $A                        ; file's location [point]
  746. fdFldr            EQU         $E                        ; file's window [word]
  747.  
  748. ; added for HFS
  749.  
  750. ; FXInfo record layout
  751.  
  752. fdIconID          EQU         $0                        ; Icon ID [word]
  753. fdUnused          EQU         $2                        ; unused but reserved [3 words]
  754. fdScript        EQU            $8                        ; script flag and number [byte]
  755. fdXFlags        EQU            $9                        ; more flags bits [byte]
  756. fdComment         EQU         $A                        ; Comment ID [word]
  757. fdPutAway         EQU         $C                        ; Home Dir ID [2 words]
  758.  
  759. ; DInfo record layout
  760.  
  761. frRect            EQU         $0                        ; Folder Rect [4 words]
  762. frFlags           EQU         $8                        ; Flags [word]
  763. frLocation        EQU         $A                        ; Location [2 words]
  764. frView            EQU         $E                        ; Folder view [word]
  765.  
  766. ; DXInfo record layout
  767.  
  768. frScroll          EQU         $0                        ; scroll position [2 words]
  769. frOpenChain       EQU         $4                        ; dirID chain of open folders [2 words]
  770. frScript        EQU            $8                        ; script flag and number [byte]
  771. frXFlags        EQU            $9                        ; more flags bits [byte]
  772. frComment         EQU         $A                        ; comment [word]
  773. frPutAway         EQU         $C                        ; Dir ID [2 words]
  774.  
  775. ;end of addition
  776.  
  777. ; Masks for fdFlags field of FInfo record defined above
  778.  
  779. fOnDesk           EQU         1
  780. fHasBundle        EQU         8192                      ; set if file has a bundle
  781. fInvisible        EQU         16384                     ; set if file's icon is invisible
  782. fTrash            EQU         -3                        ; file is in Trash window
  783. fDeskTop          EQU         -2                        ; file is on desktop
  784. fDisk             EQU         0                         ; file is in disk window
  785.  
  786. ; File System Globals
  787.  
  788. DrvQHdr           EQU         $308                      ; queue header of drives in system [10 bytes]
  789. BootDrive         EQU         $210                      ; drive number of boot drive [word]
  790. EjectNotify       EQU         $338                      ; eject notify procedure [pointer]
  791. IAZNotify         EQU         $33C                      ; world swaps notify procedure [pointer]
  792. SFSaveDisk        EQU         $214                      ; last vRefNum seen by standard file [word]
  793. CurDirStore       EQU         46+$36A                   ; save dir across calls to Standard File [long]
  794.  
  795.  
  796. ;+ Date-Time record (for use with _Secs2Date, and _Date2Secs)
  797.  
  798. DateTimeRec     RECORD        0                        ; moved here from ScriptEqu.a <04/23/89 pke>
  799. year            DS.W        1
  800. month            DS.W        1
  801. day             DS.W        1
  802. hour            DS.W        1
  803. minute            DS.W        1
  804. second            DS.W        1
  805. dayOfWeek        DS.W        1
  806. DateTimeRecSize    EQU            *
  807. size            EQU            *
  808.                 ENDR
  809.  
  810. dtYear            EQU         $0                        ; year (1904..) [word]
  811. dtMonth           EQU         $2                        ; month (1..12) [word]
  812. dtDay             EQU         $4                        ; day (1..31) [word]
  813. dtHour            EQU         $6                        ; hour (0..23) [word]
  814. dtMinute          EQU         $8                        ; minute (0..59) [word]
  815. dtSecond          EQU         $A                        ; second (0..59) [word]
  816. dtDayOfWeek       EQU         $C                        ; day of week, sunday..saturday (1..7) [word]
  817.  
  818.  
  819. ;+ Miscellaneous stuff
  820.  
  821. OneOne            EQU         $A02                      ; constant $00010001 [long]
  822. MinusOne          EQU         $A06                      ; constant $FFFFFFFF [long]
  823. Lo3Bytes          EQU         $31A                      ; constant $00FFFFFF [long]
  824. ROMBase           EQU         $2AE                      ; ROM base address [pointer]
  825. RAMBase           EQU         $2B2                      ; RAM base address [pointer]
  826. SysVersion        EQU         $15A                      ; version # of RAM-based system [word]
  827. RndSeed           EQU         $156                      ; random seed/number [long]
  828.  
  829. ; fields for _GetDefaultStartup: [DefStartRec]
  830. ; SlotDev:
  831. sdExtDevID        EQU         $0                        ; [byte]
  832. sdPartition       EQU         $1                        ; [byte]
  833. sdSlotNum         EQU         $2                        ; [byte]
  834. sdSRsrcID         EQU         $3                        ; [byte]
  835. ; SCSIDev:
  836. sdReserved1       EQU         $0                        ; [byte]
  837. sdReserved2       EQU         $1                        ; [byte]
  838. sdRefNum          EQU         $2                        ; [word]
  839.  
  840. ; fields for _GetVideoDefault: [DefVideoRec]
  841.  
  842. sdSlot            EQU         $0                        ; [byte]
  843. sdSResource       EQU         $1                        ; [byte]
  844.  
  845. ; fields for _GetOSDefault: [DefOSRec]
  846.  
  847. sdReserved        EQU         $0                        ; [byte]
  848. sdOSType          EQU         $1                        ; [byte]
  849.  
  850.  
  851. ;+ Machine Name Resource
  852. nameRsrcID        EQU            -16395                    ; STR# rsrc in System file containing
  853.                                                     ; machine names.
  854.  
  855. ;+ SysEnvirons info
  856.  
  857.  
  858. SysEnvRec         RECORD      0
  859. environsVersion DS.W        1
  860. machineType       DS.W        1
  861. systemVersion     DS.W        1
  862. processor         DS.W        1
  863. hasFPU            DS.B        1
  864. hasColorQD        DS.B        1
  865. keyBoardType      DS.W        1
  866. atDrvrVersNum     DS.W        1
  867. sysVRefNum        DS.W        1
  868.                   ALIGN       2
  869. sysEnv1Size       EQU         *-SysEnvRec               ; size for version 1
  870. size            EQU            *
  871.                   ENDR
  872.  
  873. curSysEnvVers     EQU         2                         ; latest SysEnvirons version
  874.  
  875. ; return values
  876.  
  877. envXL             EQU         -2                        ; for the glue (double sigh)
  878. envMac            EQU         -1                        ; for the glue (sigh)
  879. envMachUnknown    EQU         0
  880. env512KE          EQU         1
  881. envMacPlus        EQU         2
  882. envSE             EQU         3
  883. envMacII          EQU         4
  884. envMacIIx          EQU         5
  885. envMacIIcx         EQU         6
  886. envSE30           EQU         7
  887. envPortable        EQU            8
  888. envMacIIci        EQU            9
  889. envMacIIfx        EQU            11
  890.  
  891. envCPUUnknown     EQU         0                         ; CPU types
  892. env68000          EQU         1
  893. env68010          EQU         2
  894. env68020          EQU         3
  895. env68030          EQU         4
  896. env68040        EQU            5                        ; <4.8>
  897.  
  898. envUnknownKbd     EQU         0                         ; Keyboard types
  899. envMacKbd         EQU         1
  900. envMacAndPad      EQU         2
  901. envMacPlusKbd     EQU         3
  902. envAExtendKbd     EQU         4
  903. envStandADBKbd    EQU         5
  904. envPrtblADBKbd    EQU            6                        ; <4.9>
  905. envPrtblISOKbd    EQU            7
  906. envStdISOADBKbd    EQU            8
  907. envExtISOADBKbd    EQU            9
  908.  
  909.  
  910. ;+ Scratch Areas
  911.  
  912. Scratch20         EQU         $1E4                      ; scratch [20 bytes]
  913. Scratch8          EQU         $9FA                      ; scratch [8 bytes]
  914.  
  915.  
  916. ;+ Scrap Manager
  917.  
  918. ScrapSize         EQU         $960                      ; scrap length [long]
  919. ScrapHandle       EQU         $964                      ; memory scrap [handle]
  920. ScrapCount        EQU         $968                      ; validation byte [word]
  921. ScrapState        EQU         $96A                      ; scrap state [word]
  922. ScrapName         EQU         $96C                      ; pointer to scrap name [pointer]
  923.  
  924.  
  925. ;+ Desk Accessories
  926.  
  927.  
  928. ; Message Definitions (in CSCode of control call)
  929.  
  930. accEvent          EQU         $40                       ; event message from SystemEvent
  931. accRun            EQU         $41                       ; run message from SystemTask
  932. accCursor         EQU         $42                       ; cursor message from SystemTask
  933. accMenu           EQU         $43                       ; menu message from SystemMenu
  934. accUndo           EQU         $44                       ; undo message from SystemEdit
  935. accCut            EQU         $46                       ; cut message from SystemEdit
  936. accCopy           EQU         $47                       ; copy message from SystemEdit
  937. accPaste          EQU         $48                       ; paste message from SystemEdit
  938. accClear          EQU         $49                       ; clear message from SystemEdit
  939. goodBye           EQU         -1                        ; goodbye message
  940.  
  941.  
  942.                   IF          wholeSystem=1 THEN
  943.  
  944. ;International stuff
  945.  
  946. IntlSpec          EQU         $BA0                      ; (long) - ptr to extra Intl data
  947.  
  948. ;Switcher
  949.  
  950. SwitcherTPtr      EQU         $286                      ; Switcher's switch table
  951.  
  952. ; Trap bits for memory manager
  953.  
  954. tSysOrCurZone     EQU         10                        ; bit set implies System Zone
  955. ; bit clear implies Current Zone
  956. clearBit          EQU         9                         ; bit set means clear allocated memory.
  957.  
  958.  
  959. ; Peripheral chips and Magic Hardware addresses
  960.  
  961. CPUFlag           EQU         $12F                      ; $00=68000, $01=68010, $02=68020 (old ROM inits to $00)
  962. cpu68000        EQU            0
  963. cpu68010        EQU            1
  964. cpu68020        EQU            2
  965. cpu68030        EQU            3
  966. cpu68040        EQU            4
  967.  
  968. ; VIA (6522) interface chip
  969.  
  970. VIA               EQU         $1D4                      ; VIA base address [pointer]
  971.  
  972. ; Disk Address
  973.  
  974. IWM               EQU         $1E0                      ; IWM base address [pointer]
  975.  
  976.  
  977. ; Interrupt secondary vectors
  978.  
  979. Lvl1DT            EQU         $192                      ; Interrupt level 1 dispatch table [32 bytes]
  980. Lvl2DT            EQU         $1B2                      ; Interrupt level 2 dispatch table [32 bytes]
  981. ExtStsDT          EQU         $2BE                      ; SCC ext/sts secondary dispatch table [16 bytes]
  982.  
  983.  
  984.  
  985. ; Parameter Ram
  986.  
  987. SPValid           EQU         $1F8                      ; validation field ($A7) [byte]
  988. SPATalkA          EQU         $1F9                      ; AppleTalk node number hint for port A
  989. SPATalkB          EQU         $1FA                      ; AppleTalk node number hint for port B
  990. SPAlarm           EQU         $200                      ; alarm time [long]
  991. SPFont            EQU         $204                      ; default application font number minus 1 [word]
  992. SPKbd             EQU         $206                      ; kbd repeat thresh in 4/60ths [2 4-bit]
  993. SPPrint           EQU         $207                      ; print stuff [byte]
  994. SPVolCtl          EQU         $208                      ; volume control [byte]
  995. SPClikCaret       EQU         $209                      ; double click/caret time in 4/60ths[2 4-bit]
  996. SPMisc1           EQU         $20A                      ; miscellaneous [1 byte]
  997. SPMisc2           EQU         $20B                      ; miscellaneous [1 byte]
  998. GetParam          EQU         $1E4                      ; system parameter scratch [20 bytes]
  999. SysParam          EQU         $1F8                      ; system parameter memory [20 bytes]
  1000.  
  1001. ; Cursor
  1002.  
  1003. CrsrThresh        EQU         $8EC                      ; delta threshold for mouse scaling [word]
  1004. JCrsrTask         EQU         $8EE                      ; address of CrsrVBLTask [long]
  1005. MTemp             EQU         $828                      ; Low-level interrupt mouse location [long]
  1006. RawMouse          EQU         $82C                      ; un-jerked mouse coordinates [long]
  1007. CrsrRect          EQU         $83C                      ; Cursor hit rectangle [8 bytes]
  1008. TheCrsr           EQU         $844                      ; Cursor data, mask & hotspot [68 bytes]
  1009. CrsrAddr          EQU         $888                      ; Address of data under cursor [long]
  1010. CrsrSave          EQU         $88C                      ; data under the cursor [64 bytes]
  1011. CrsrVis           EQU         $8CC                      ; Cursor visible? [byte]
  1012. CrsrBusy          EQU         $8CD                      ; Cursor locked out? [byte]
  1013. CrsrNew           EQU         $8CE                      ; Cursor changed? [byte]
  1014. CrsrState         EQU         $8D0                      ; Cursor nesting level [word]
  1015. CrsrObscure       EQU         $8D2                      ; Cursor obscure semaphore [byte]
  1016.  
  1017. ; Mouse/Keyboard
  1018.  
  1019. KbdVars           EQU         $216                      ; Keyboard manager variables [4 bytes]
  1020. KbdType           EQU         $21E                      ; keyboard model number [byte]
  1021. MBState           EQU         $172                      ; current mouse button state [byte]
  1022. KeyMap            EQU         $174                      ; bitmap of the keyboard [2 longs]
  1023. KeypadMap         EQU         $17C                      ; bitmap for numeric pad-18bits [long]
  1024. Key1Trans         EQU         $29E                      ; keyboard translator procedure [pointer]
  1025. Key2Trans         EQU         $2A2                      ; numeric keypad translator procedure [pointer]
  1026. JGNEFilter        EQU         $29A                      ; GetNextEvent filter proc [pointer]
  1027. KeyMVars          EQU         $B04                      ; (word) for ROM KEYM proc state
  1028. Mouse             EQU         $830                      ; processed mouse coordinate [long]
  1029. CrsrPin           EQU         $834                      ; cursor pinning rectangle [8 bytes]
  1030. CrsrCouple        EQU         $8CF                      ; cursor coupled to mouse? [byte]
  1031. CrsrScale         EQU         $8D3                      ; cursor scaled? [byte]
  1032. MouseMask         EQU         $8D6                      ; V-H mask for ANDing with mouse [long]
  1033. MouseOffset       EQU         $8DA                      ; V-H offset for adding after ANDing [long]
  1034.  
  1035. ; System Clocks
  1036.  
  1037. AlarmState        EQU         $21F                      ; Bit7=parity, Bit6=beeped, Bit0=enable [byte]
  1038.  
  1039.  
  1040. ;+ Vertical Blanking Interrupt Handler
  1041.  
  1042. ; VBL Block Queue Element
  1043.  
  1044. vType             EQU         1                         ; VBL queue element is type 1
  1045. inVbl             EQU         6                         ; bit index for "in VBL" flag
  1046. vblink            EQU         0                         ; Link to next element [pointer]
  1047. vblType           EQU         4                         ; Unique ID for validity [word]
  1048. vblAddr           EQU         6                         ; service routine [pointer]
  1049. vblCount          EQU         $A                        ; timeout count [word]
  1050. vblPhase          EQU         $C                        ; phase count [word]
  1051. VBLQueue          EQU         $160                      ; VBL queue header [10 bytes]
  1052.  
  1053. ; Event manager
  1054.  
  1055. jPlayCtl          EQU         16                        ; playBack call
  1056. jRecordCtl        EQU         17                        ; record call
  1057. jcTickCount       EQU         0                         ; journal code for TickCount
  1058. jcGetMouse        EQU         1                         ; journal code for GetMouse
  1059. jcButton          EQU         2                         ; journal code for Button
  1060. jcGetKeys         EQU         3                         ; journal code for GetKeys
  1061. jcEvent           EQU         4                         ; journal code for GetNextEvent(Avail)
  1062. SysEvtMask        EQU         $144                      ; system event mask [word]
  1063. SysEvtBuf         EQU         $146                      ; system event queue element buffer [pointer]
  1064. EventQueue        EQU         $14A                      ; event queue header [10 bytes]
  1065. EvtBufCnt         EQU         $154                      ; max number of events in SysEvtBuf - 1 [word]
  1066.  
  1067. ; Event Queue Element Data Stucture
  1068.  
  1069. evtQWhat          EQU         6                         ; event code [word]
  1070. evtQMessage       EQU         8                         ; event message [long]
  1071. evtQWhen          EQU         $C                        ; ticks since startup [long]
  1072. evtQWhere         EQU         $10                       ; mouse location [long]
  1073. evtQMeta          EQU         $14                       ; state of modifier keys [byte]
  1074. evtQMBut          EQU         $15                       ; state of mouse button [byte]
  1075. evtQBlkSize       EQU         $16                       ; size of event record counting queue info
  1076.  
  1077. ; flags in flags field in heapzone header
  1078.  
  1079. fOnCheck          EQU         0                         ; Turn On Checking
  1080. fChecking         EQU         1                         ; Checking on
  1081. fNSelCompct       EQU         4                         ; Use non-selective compact algorithm when 1.
  1082. fNoRvrAlloc       EQU         5                         ; Don't use rover allocation scheme when 1.
  1083. fNSelPurge        EQU         6                         ; Use non-selective purge algorithm when 1.
  1084. fRelAtEnd         EQU         7                         ; MakeBk packs rels at end of free bk when 1.
  1085. ROZ               EQU         $0                        ; bit in flags field of MemMgr zone header
  1086.  
  1087. ; Block Types
  1088.  
  1089. tybkMask          EQU         3                         ; Mask for block type
  1090. tybkFree          EQU         0                         ; Free Block
  1091. tybkNRel          EQU         1                         ; Non-Relocatable
  1092. tybkRel           EQU         2                         ; Relocatable
  1093.  
  1094. ; Block Offsets
  1095.  
  1096. tagBC             EQU         0                         ; Tag and Byte Count field [long]
  1097. handle            EQU         4                         ; back pointer to master pointer [pointer]
  1098. blkData           EQU         8                         ; data starts here
  1099.  
  1100. ; Heap Zone header
  1101.  
  1102. bkLim             EQU         $0                        ; last block in zone [pointer]
  1103. purgePtr          EQU         $4                        ; roving purge placeholder [pointer]
  1104. hFstFree          EQU         $8                        ; first free handle [pointer]
  1105. zcbFree           EQU         $C                        ; # of free bytes in zone [long]
  1106. gzProc            EQU         $10                       ; grow zone procedure [pointer]
  1107. mAllocCnt         EQU         $14                       ; # of master ptrs to allocate [word]
  1108. flags             EQU         $16                       ; Flags [word]
  1109. cntRel            EQU         $18                       ; # of allocated relocatable blocks [word]
  1110. maxRel            EQU         $1A                       ; max # of allocated rel. blocks [word]
  1111. cntNRel           EQU         $1C                       ; # of allocated non-rel. blocks [word]
  1112. maxNRel           EQU         $1E                       ; max # of allocated non-rel. blocks [word]
  1113. cntEmpty          EQU         $20                       ; # of empty handles [word]
  1114. cntHandles        EQU         $22                       ; total # of handles [word]
  1115. minCBFree         EQU         $24                       ; min # of bytes free [long]
  1116. purgeProc         EQU         $28                       ; purge warning procedure [pointer]
  1117. allocPtr          EQU         $30                       ; roving allocator [pointer]
  1118. heapData          EQU         $34                       ; start of heap zone data
  1119.  
  1120.  
  1121.  
  1122. GZRootHnd         EQU         $328                      ; root handle for GrowZone [handle]
  1123. GZRootPtr         EQU         $32C                      ; root pointer for GrowZone [pointer]
  1124. GZMoveHnd         EQU         $330                      ; moving handle for GrowZone [handle]
  1125. MemTop            EQU         $108                      ; top of memory [pointer]
  1126. MmInOK            EQU         $12E                      ; initial memory mgr checks ok? [byte]
  1127. HpChk             EQU         $316                      ; heap check RAM code [pointer]
  1128. MaskBC            EQU         $31A                      ; Memory Manager Byte Count Mask [long]
  1129. MaskHandle        EQU         $31A                      ; Memory Manager Handle Mask [long]
  1130. MaskPtr           EQU         $31A                      ; Memory Manager Pointer Mask [long]
  1131. MinStack          EQU         $31E                      ; min stack size used in InitApplZone [long]
  1132. DefltStack        EQU         $322                      ; default size of stack [long]
  1133. MMDefFlags        EQU         $326                      ; default zone flags [word]
  1134.  
  1135. ;+ System Error Handler
  1136.  
  1137. DSAlertTab        EQU         $2BA                      ; system error alerts [pointer]
  1138. DSAlertRect       EQU         $3F8                      ; rectangle for disk-switch alert [8 bytes]
  1139. DSDrawProc        EQU         $334                      ; alternate syserror draw procedure [pointer]
  1140. DSWndUpdate       EQU         $15D                      ; GNE not to paintBehind DS AlertRect? [byte]
  1141. WWExist           EQU         $8F2                      ; window manager initialized? [byte]
  1142. QDExist           EQU         $8F3                      ; quickdraw is initialized [byte]
  1143. ResumeProc        EQU         $A8C                      ; Resume procedure from InitDialogs [pointer]
  1144. DSErrCode         EQU         $AF0                      ; last system error alert ID
  1145.  
  1146. ;+ Drivers
  1147.  
  1148. dskRfN            EQU         $FFFB                     ; 3.5" disk reference number
  1149. IntFlag           EQU         $15F                      ; reduce interrupt disable time when bit 7 = 0
  1150.  
  1151. ; Serial I/O Driver
  1152.  
  1153. SerialVars        EQU         $2D0                      ; async driver variables [16 bytes]
  1154. ABusVars          EQU         $2D8                      ; Pointer to AppleTalk local variables
  1155. ABusDCE           EQU         $2DC                      ; Pointer to AppleTalk DCE
  1156. PortAUse          EQU         $290                      ; bit 7: 1 = not in use, 0 = in use
  1157. ; bits 0-3: current use of port (see use type)
  1158. ; bits 4-6: user specific
  1159. PortBUse          EQU         $291                      ; port B use, same format as PortAUse
  1160. SCCASts           EQU         $2CE                      ; SCC read reg 0 last ext/sts rupt - A [byte]
  1161. SCCBSts           EQU         $2CF                      ; SCC read reg 0 last ext/sts rupt - B [byte]
  1162.  
  1163. ; Serial handshake record definition
  1164.  
  1165. shFXOn            EQU         $0                        ; XOn/XOff output control flags [byte]
  1166. shFCTS            EQU         $1                        ; CTS hardware handshake flag [byte]
  1167. shXOn             EQU         $2                        ; XOn character [byte]
  1168. shXOff            EQU         $3                        ; XOff character [byte]
  1169. shErrs            EQU         $4                        ; errors that cause abort [byte]
  1170. shEvts            EQU         $5                        ; status changes that cause events [byte]
  1171. shFInX            EQU         $6                        ; XOn/XOff input flow control flag [byte]
  1172. shNull            EQU         $7                        ; not used [byte]
  1173.  
  1174. ; Serial status record definition
  1175.  
  1176. ssCumErrs         EQU         $0                        ; cumulative errors [byte]
  1177. ssXOffSent        EQU         $1                        ; XOff sent as input control flag [byte]
  1178. ssRdPend          EQU         $2                        ; read pending flag [byte]
  1179. ssWrPend          EQU         $3                        ; write pending flag [byte]
  1180. ssCTSHold         EQU         $4                        ; CTS flow control hold flag [byte]
  1181. ssXOffHold        EQU         $5                        ; XOff received as output flow control [byte]
  1182.  
  1183. ; Disk Driver
  1184.  
  1185. ; Driver Code Header (for I/O drivers, desk accessories)
  1186.  
  1187. drvrFlags         EQU         $0                        ; various flags and permissions [word]
  1188. drvrDelay         EQU         $2                        ; # of ticks between systask calls [word]
  1189. drvrEMask         EQU         $4                        ; event mask [word]
  1190. drvrMenu          EQU         $6                        ; driver menu ID [word]
  1191. drvrOpen          EQU         $8                        ; open routine offset [word]
  1192. drvrPrime         EQU         $A                        ; prime routine offset [word]
  1193. drvrCtl           EQU         $C                        ; control routine offset [word]
  1194. drvrStatus        EQU         $E                        ; status routine offset [word]
  1195. drvrClose         EQU         $10                       ; warmstart reset routine offset [word]
  1196. drvrName          EQU         $12                       ; length byte and name of driver [string]
  1197. ;drvrVersion EQU ??? ; Driver w/ highest version # installed [word]
  1198. ; This field's offset varies depending upon the length
  1199. ; of the Name field preceding it. It must be word aligned!
  1200.  
  1201. ; Driver Status record definition
  1202.  
  1203. dsTrack           EQU         $0                        ; current track [word]
  1204. dsWriteProt       EQU         $2                        ; bit 7=1 if volume locked [byte]
  1205. dsDiskInPlace     EQU         $3                        ; disk in place [byte]
  1206. dsInstalled       EQU         $4                        ; drive installed [byte]
  1207. dsSides           EQU         $5                        ; bit 7=0 if single-sided drive [byte]
  1208. dsQLink           EQU         $6                        ; next queue entry [pointer]
  1209. dsDQVers          EQU         $A                        ; 1 for HD20 [word]
  1210. dsDQDrive         EQU         $C                        ; drive number [word]
  1211. dsDQRefNum        EQU         $E                        ; driver reference number [word]
  1212. dsDQFSID          EQU         $10                       ; file-system identifier [word]
  1213. dsTwoSideFmt      EQU         $12                       ; -1 if two-sided disk [byte]
  1214. dsDiskErrs        EQU         $14                       ; error count [word]
  1215. dsDrvSize         EQU         $12                       ; drive block size low word [word]
  1216. dsDrvS1           EQU         $14                       ; drive block size high word [word]
  1217. dsDrvType         EQU         $16                       ; 1 for HD20 [word]
  1218. dsDrvManf         EQU         $18                       ; 1 for Apple Computer, Inc [word]
  1219. dsDrvChar         EQU         $1A                       ; 230 ($E6) for HD20 [word]
  1220. dsDrvMisc         EQU         $1C                       ; 0 -- reserved [byte]
  1221.  
  1222.  
  1223. DskErr            EQU         $142                      ; disk routine result code [word]
  1224. PWMBuf2           EQU         $312                      ; PWM buffer 1 (or 2 if sound) [pointer]
  1225.  
  1226. ; Drive command codes
  1227.  
  1228. dcRead            EQU         0
  1229. dcWrite           EQU         1
  1230. dcStatus          EQU         3
  1231. dcInit            EQU         25
  1232. dcScan            EQU         26
  1233.  
  1234. ; Sound Stuff
  1235.  
  1236. SoundPtr          EQU         $262                      ; 4VE sound definition table [pointer]
  1237. SoundBase         EQU         $266                      ; sound bitMap [pointer]
  1238. SoundVBL          EQU         $26A                      ; vertical retrace control element [16 bytes]
  1239. SoundDCE          EQU         $27A                      ; sound driver DCE [pointer]
  1240. SoundActive       EQU         $27E                      ; sound is active? [byte]
  1241. SoundLevel        EQU         $27F                      ; current level in buffer [byte]
  1242. CurPitch          EQU         $280                      ; current pitch value [word]
  1243.  
  1244. ; I/O System
  1245.  
  1246. noQueueBit        EQU         $9                        ; tells I/O system not to queue the request
  1247. asyncTrpBit       EQU         $A                        ; bit in high byte of trap specifying async
  1248. ToExtFS           EQU         $3F2                      ; hook for external file systems
  1249.  
  1250. ; File System Globals
  1251.  
  1252. DskVerify         EQU         $12C                      ; used by 3.5 disk driver for read/verify [byte]
  1253. TagData           EQU         $2FA                      ; sector tag info for disk drivers [14 bytes]
  1254. BufTgFNum         EQU         $2FC                      ; file number [long]
  1255. BufTgFFlg         EQU         $300                      ; flags [word]
  1256. BufTgFBkNum       EQU         $302                      ; logical block number [word]
  1257. BufTgDate         EQU         $304                      ; time stamp [word]
  1258.  
  1259. ; I/O Command Equates for I/O Queue Elements (match trap numbers)
  1260.  
  1261. aRdCmd            EQU         2                         ; read command
  1262. aWrCmd            EQU         3                         ; write command
  1263. aCtlCmd           EQU         4                         ; control command
  1264. aStsCmd           EQU         5                         ; status command
  1265.  
  1266. ; fields for _SetPMSP call: PMSP = "Poor Man's Search Path"
  1267.  
  1268. ioPMSPFlg         EQU         $1A                       ; Flag whether to enable the PMSP
  1269. ioPMSPHook        EQU         $1C                       ; Pointer to PMSP hook proc
  1270.  
  1271. ; Print variables
  1272.  
  1273. ScrDmpEnb         EQU         $2F8                      ; screen dump enabled? [byte]
  1274. ScrDmpType        EQU         $2F9                      ; FF dumps screen, FE dumps front window [byte]
  1275.  
  1276. ; Scrap Variables
  1277.  
  1278. ScrapVars         EQU         $960                      ; scrap manager variables [32 bytes]
  1279. ScrapInfo         EQU         $960                      ; scrap length [long]
  1280. ScrapEnd          EQU         $980                      ; end of scrap vars
  1281. ScrapTag          EQU         $970                      ; scrap file name [STRING[15]]
  1282.  
  1283. ; Segment Loader
  1284.  
  1285. LaunchFlag        EQU         $902                      ; from launch or chain [byte]
  1286. SaveSegHandle     EQU         $930                      ; seg 0 handle [handle]
  1287. CurJTOffset       EQU         $934                      ; current jump table offset [word]
  1288. CurPageOption     EQU         $936                      ; current page 2 configuration [word]
  1289. LoaderPBlock      EQU         $93A                      ; param block for ExitToShell [10 bytes]
  1290. CurApRefNum       EQU         $900                      ; refNum of application's resFile [word]
  1291. CurrentA5         EQU         $904                      ; current value of A5 [pointer]
  1292. CurStackBase      EQU         $908                      ; current stack base [pointer]
  1293. CurApName         EQU         $910                      ; name of application [STRING[31]]
  1294. LoadTrap          EQU         $12D                      ; trap before launch? [byte]
  1295. SegHiEnable       EQU         $BB2                      ; (byte) 0 to disable MoveHHi in LoadSeg
  1296.  
  1297. ;device manager - Chooser message values
  1298.  
  1299. newSelMsg         EQU         12                        ; a new selection has been made
  1300. fillListMsg       EQU         13                        ; fill the list with choices to be made
  1301. getSelMsg         EQU         14                        ; mark one or more choices as selcted
  1302. selectMsg         EQU         15                        ; a choice has actually been made
  1303. deselectMsg       EQU         16                        ; a choice has been canceled
  1304. terminateMsg      EQU         17                        ; lets device package clean up
  1305. buttonMsg         EQU         19                        ; a button has been clicked
  1306. psAlert           EQU         6                         ; page setup alert bit in HiliteMode
  1307. theChooser        EQU         1
  1308.  
  1309. ; cdev message types
  1310. initDev           EQU         0                         ; Time for cdev to initialize itself
  1311. hitDev            EQU         1                         ; Hit on one of my items
  1312. closeDev          EQU         2                         ; Close yourself
  1313. nulDev            EQU         3                         ; Null event
  1314. updateDev         EQU         4                         ; Update event
  1315. activDev          EQU         5                         ; Activate event
  1316. deactivDev        EQU         6                         ; Deactivate event
  1317. keyEvtDev         EQU         7                         ; Key down/auto key
  1318. macDev            EQU         8                         ; Decide whether or not to show up
  1319. undoDev            EQU            9                        ; Edit menu undo  (cmd-z).
  1320. cutDev            EQU            10                        ; Edit menu cut   (cmd-x).
  1321. copyDev            EQU            11                        ; Edit menu copy  (cmd-c).
  1322. pasteDev        EQU            12                        ; Edit menu paste (cmd-v).
  1323. clearDev        EQU            13                        ; Edit menu clear.
  1324. cursorDev        EQU            14                        ; Cursor panel area.
  1325.  
  1326. ; Monitors control panel messages
  1327. initMsg            EQU            1                        ; initialization
  1328. okMsg            EQU            2                        ; user clicked OK button
  1329. cancelMsg        EQU            3                        ; user clicked Cancel button
  1330. hitMsg            EQU            4                        ; user clicked control in Options dialog
  1331. nulMsg            EQU            5                        ; periodic event
  1332. updateMsg        EQU            6                        ; update event
  1333. activateMsg        EQU            7                        ; not used
  1334. deactivateMsg    EQU            8                        ; not used
  1335. keyEvtMsg        EQU            9                        ; keyboard event
  1336. superMsg        EQU            10                        ; show superuser controls
  1337. normalMsg        EQU            11                        ; show only normal controls
  1338. startupMsg        EQU            12                        ; code has been loaded
  1339.  
  1340. ; cdev error codes
  1341. cdevGenErr        EQU         -1                        ; General error; gray cdev w/o alert
  1342. cdevMemErr        EQU         0                         ; Memory shortfall; alert user please
  1343. cdevResErr        EQU         1                         ; Couldn't get a needed resource; alert
  1344. cdevUnset         EQU         3                         ; cdevValue is initialized to this
  1345. ;___________________________________________________________________________
  1346. ;
  1347. ; Background Notification Manager
  1348.  
  1349. BNMQHd            EQU         $B60                      ; head of background notification Q
  1350.  
  1351. ;___________________________________________________________________________
  1352. ;
  1353. ; Communications Toolbox Globals Pointer
  1354.  
  1355. CommToolboxGlobals    EQU         $BB4                  ; [long] pointer to CTB Globals <8>
  1356.  
  1357.  
  1358. ;___________________________________________________________________________
  1359. ; Memory Manager
  1360.  
  1361. defaultPhysicalEntryCount EQU    8            ; default number of physical blocks in table
  1362.  
  1363. ; values returned from the GetPageState function
  1364.  
  1365. kPageInMemory          EQU            0
  1366. kPageOnDisk            EQU            1
  1367. kNotPaged              EQU            2
  1368.  
  1369. MemoryBlock            RECORD        0
  1370. address                DS.L        1            ; start of block
  1371. count                DS.L        1            ; size of block
  1372. size                EQU            *            ; size of MemoryBlock
  1373.                     ENDR
  1374.  
  1375. LogicalToPhysicalTable RECORD    0
  1376. logical                DS.B        MemoryBlock    ; logical block
  1377. physical            EQU            *            ; equivalent physical blocks
  1378. size                EQU            *            ; minimum size of table
  1379. defaultSize            EQU            size + (MemoryBlock.size * defaultPhysicalEntryCount)
  1380.                     ENDR
  1381.  
  1382. ;___________________________________________________________________________
  1383. ;
  1384.  
  1385. JDoEject          EQU         4*($F7)+$0400             ; Sony Driver jump vectors
  1386.  
  1387.  
  1388.                   ENDIF
  1389.  
  1390.     ENDIF    ; if not already included...